<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: NetwControlInfo Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00155.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle">
<div class="title">NetwControlInfo Class Reference<div class="ingroups"><a class="el" href="a00514.html">utils  -  utility classes</a> &#124; <a class="el" href="a00518.html">baseUtils - utilities for base MiXiM</a> &#124; <a class="el" href="a00507.html">netwLayer - network layer modules</a> &#124; <a class="el" href="a00506.html">applLayer - application layer modules</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="NetwControlInfo" -->
<p>Control info netw messages.  
 <a href="a00155.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00311_source.html">NetwControlInfo.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for NetwControlInfo:</div>
<div class="dyncontent">
<div class="center"><img src="a00896.png" border="0" usemap="#NetwControlInfo_inherit__map" alt="Inheritance graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a00897.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a362fd0f2bbdb4cd8b3b511c176a0d37f"></a><!-- doxytag: member="NetwControlInfo::NetwControlInfo" ref="a362fd0f2bbdb4cd8b3b511c176a0d37f" args="(const LAddress::L3Type &amp;addr=LAddress::L3NULL)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#a362fd0f2bbdb4cd8b3b511c176a0d37f">NetwControlInfo</a> (const <a class="el" href="a00117.html#ad85cd9e8d9e7e9cd5d02dd740c4a12a4">LAddress::L3Type</a> &amp;addr=<a class="el" href="a00117.html#a629f951ff7bc5f42e945bbc5573c4a0f">LAddress::L3NULL</a>)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8bcbd2cb7ac307be9c2e021f0456e01d"></a><!-- doxytag: member="NetwControlInfo::~NetwControlInfo" ref="a8bcbd2cb7ac307be9c2e021f0456e01d" args="()" -->
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#a8bcbd2cb7ac307be9c2e021f0456e01d">~NetwControlInfo</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a35494d527ef6bf7acad34d08633a237d"></a><!-- doxytag: member="NetwControlInfo::getNetwAddr" ref="a35494d527ef6bf7acad34d08633a237d" args="() const " -->
virtual const <a class="el" href="a00117.html#ad85cd9e8d9e7e9cd5d02dd740c4a12a4">LAddress::L3Type</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#a35494d527ef6bf7acad34d08633a237d">getNetwAddr</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Getter method. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9e22374ff923fbcf1fc57d2cf13ee6a4"></a><!-- doxytag: member="NetwControlInfo::setNetwAddr" ref="a9e22374ff923fbcf1fc57d2cf13ee6a4" args="(const LAddress::L3Type &amp;addr)" -->
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#a9e22374ff923fbcf1fc57d2cf13ee6a4">setNetwAddr</a> (const <a class="el" href="a00117.html#ad85cd9e8d9e7e9cd5d02dd740c4a12a4">LAddress::L3Type</a> &amp;addr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Setter method. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static cObject *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#a8e95c523ae2e3136ab34313da7384dea">setControlInfo</a> (cMessage *const pMsg, const <a class="el" href="a00117.html#ad85cd9e8d9e7e9cd5d02dd740c4a12a4">LAddress::L3Type</a> &amp;pAddr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Attaches a "control info" structure (object) to the message pMsg.  <a href="#a8e95c523ae2e3136ab34313da7384dea"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a75c4c6c2073fcd17b73583b7243e8d21"></a><!-- doxytag: member="NetwControlInfo::getAddressFromControlInfo" ref="a75c4c6c2073fcd17b73583b7243e8d21" args="(cObject *const pCtrlInfo)" -->
static const <a class="el" href="a00117.html#ad85cd9e8d9e7e9cd5d02dd740c4a12a4">LAddress::L3Type</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#a75c4c6c2073fcd17b73583b7243e8d21">getAddressFromControlInfo</a> (cObject *const pCtrlInfo)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">extracts the address from "control info". <br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad0f1dfb07eb4f0af53540c92a94b1626"></a><!-- doxytag: member="NetwControlInfo::netwAddr" ref="ad0f1dfb07eb4f0af53540c92a94b1626" args="" -->
<a class="el" href="a00117.html#ad85cd9e8d9e7e9cd5d02dd740c4a12a4">LAddress::L3Type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00155.html#ad0f1dfb07eb4f0af53540c92a94b1626">netwAddr</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">netw address of the sending or receiving node <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Control info netw messages. </p>
<p>Control Info to pass interface information from the network to the application layer and vice versa. The application layer passes the destination netw address to the network layer, whereas the network layer uses the control info to pass the source netw address to the application layer</p>
<dl class="author"><dt><b>Author:</b></dt><dd>Daniel Willkomm </dd></dl>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a8e95c523ae2e3136ab34313da7384dea"></a><!-- doxytag: member="NetwControlInfo::setControlInfo" ref="a8e95c523ae2e3136ab34313da7384dea" args="(cMessage *const pMsg, const LAddress::L3Type &amp;pAddr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static cObject* NetwControlInfo::setControlInfo </td>
          <td>(</td>
          <td class="paramtype">cMessage *const&#160;</td>
          <td class="paramname"><em>pMsg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="a00117.html#ad85cd9e8d9e7e9cd5d02dd740c4a12a4">LAddress::L3Type</a> &amp;&#160;</td>
          <td class="paramname"><em>pAddr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Attaches a "control info" structure (object) to the message pMsg. </p>
<p>This is most useful when passing packets between protocol layers of a protocol stack, the control info will contain the destination MAC address.</p>
<p>The "control info" object will be deleted when the message is deleted. Only one "control info" structure can be attached (the second setL3ToL2ControlInfo() call throws an error).</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pMsg</td><td>The message where the "control info" shall be attached. </td></tr>
    <tr><td class="paramname">pAddr</td><td>The network address of to save. </td></tr>
  </table>
  </dd>
</dl>

<p>Referenced by <a class="el" href="a00208.html#aacf2004acd42e50fe4c46bdc3dcffbc2">TestApplLayer::sendBroadcast()</a>, <a class="el" href="a00217.html#a246eb89973ae5af45a3c7ee7279e9777">TrafficGen::sendBroadcast()</a>, <a class="el" href="a00191.html#a874cfc7ac28f9b46f51eea860536ab59">SensorApplLayer::sendData()</a>, and <a class="el" href="a00028.html#a701bcbce5b46085ad3c987aecfd84010">BaseNetwLayer::setUpControlInfo()</a>.</p>
<div class="fragment"><pre class="fragment">                                                                                      {
      <a class="code" href="a00155.html" title="Control info netw messages.">NetwControlInfo</a> *<span class="keyword">const</span> cCtrlInfo = <span class="keyword">new</span> <a class="code" href="a00155.html#a362fd0f2bbdb4cd8b3b511c176a0d37f" title="Default constructor.">NetwControlInfo</a>(pAddr);
      pMsg-&gt;setControlInfo(cCtrlInfo);

      <span class="keywordflow">return</span> cCtrlInfo;
    }
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/base/utils/<a class="el" href="a00311_source.html">NetwControlInfo.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00155.html">NetwControlInfo</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:32 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
